Skip to content

Conversation

@nammn
Copy link
Collaborator

@nammn nammn commented Dec 16, 2025

Summary

This pull request fixes the issue: "Monitoring fails to start when disabling TLS"

TLS Parameter Handling Improvements:

  • In deployment.go, when TLS is disabled, the "additionalParams" key is now removed from the monitoring configuration to prevent monitoring agents from referencing non-existent certificate files.
  • In appdbreplicaset_controller.go, the code explicitly clears the AdditionalParams field for each monitoring version when TLS is disabled, further ensuring that leftover TLS settings are not retained.

Testing Enhancements:

  • A new test, TestAddMonitoringTLSDisable, was added to deployment_test.go to verify that enabling and then disabling TLS correctly adds and then removes TLS parameters from the monitoring configuration.

Proof of Work

  • green patch

Checklist

  • Have you linked a jira ticket and/or is the ticket in the title?
  • Have you checked whether your jira ticket required DOCSP changes?
  • Have you added changelog file?

@github-actions
Copy link

⚠️ (this preview might not be accurate if the PR is not rebased on current master branch)

MCK 1.6.2 Release Notes

Bug Fixes

  • Fixed an issue where monitoring agents would fail after disabling TLS on a MongoDB deployment.

tags: [ "pr_patch", "staging", "e2e_test_suite", "static" ]
run_on:
- ubuntu2404-large
<<: *base_om8_dependency
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert me once the image build has been fixed for the database image

@nammn nammn force-pushed the fix-tls-stopping branch 4 times, most recently from 2d967f1 to 73a98ff Compare December 18, 2025 13:31
When TLS is disabled on AppDB, clear stale TLS params from monitoring
config's additionalParams to prevent the monitoring agent from trying
to use certificate files that no longer exist.

Added addTLSParams/clearTLSParams functions that use shared constants
to ensure add and remove operations stay in sync.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants